﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DBHelper;
using System.Data;
using System.Data.SqlClient;
using BusinessLayer.FindArtInfo.Entities;

namespace BusinessLayer.FindArtInfo
{
    public class ItemTypeBL
    {
        private readonly DbHelper _db;

        public ItemTypeBL()
        {
            _db = new DbHelper(new DbConfig().DbFindArtInfoConnectionString);         
        }

        public List<ItemType> GetAll()
        {
            var oCommand = new SqlCommand("sp_ItemType_Select_All") { CommandType = CommandType.StoredProcedure };
            var listItemType = _db.GetList<ItemType>(oCommand);
            return listItemType; 
        }
    }
}
